escape mechanism

Noun
  1. a form of behavior that evades unpleasant realities
escape mechanism
A student uses daydreaming as an escape mechanism during a difficult lecture.